package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * <p>
 * 出库单
 * </p>
 *
 * @author LEO
 * @since 2020-08-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_outbound")
@ApiModel(value="Outbound对象", description="出库单")
public class Outbound extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "出库单号")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "仓库")
    @TableField("warehouse_code")
    private String warehouseCode;

    @ApiModelProperty(value = "入驻商")
    @TableField("shipment_code")
    private String shipmentCode;

    @ApiModelProperty(value = "入驻商")
    @TableField("shipment_name")
    private String shipmentName;

    @ApiModelProperty(value = "客户")
    @TableField("customer_code")
    private String customerCode;

    @ApiModelProperty(value = "所属机构Code")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "下发状态:0未下发，1已下发；")
    @TableField("is_issue")
    private Integer issue;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_code")
    private String sourceCode;

    @ApiModelProperty(value = "发货单号")
    @TableField("delivery_code")
    private String deliveryCode;

    @ApiModelProperty(value = "计划总数量")
    @TableField("plan_quantity")
    private BigDecimal planQuantity;

    @ApiModelProperty(value = "复核总数量")
    @TableField("recheck_quantity")
    private BigDecimal recheckQuantity;

    @ApiModelProperty(value = "退减总数量")
    @TableField("return_quantity")
    private BigDecimal returnQuantity;

    @ApiModelProperty(value = "发货总数量（基本单位）")
    @TableField("out_quantity")
    private BigDecimal outQuantity;

    @ApiModelProperty(value = "发货总数量（非基本单位）")
    @TableField("out_unit_quantity")
    private BigDecimal outUnitQuantity;

    @ApiModelProperty(value = "拣货单号")
    @TableField("picking_code")
    private String pickingCode;

    @ApiModelProperty(value = "面单号")
    @TableField("waybill_code")
    private String waybillCode;

    @ApiModelProperty(value = "单据类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "状态；见OutboundStatusEnum")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "是否oms下发的；0：否；1：是；用于后期判断反填oms数据")
    @TableField("is_oms_order")
    private Integer isOmsOrder;

    @ApiModelProperty(value = "波次单号")
    @TableField("wave_picking_code")
    private String wavePickingCode;

    /**
     * 物流公司编码(SF=顺丰、EMS=标准快递、EYB=经济快件、ZJS=宅急送、YTO=圆通 、ZTO=中 通(ZTO)、HTKY=百世汇通、UC=优速、STO=申通、TTKDEX=天天快递、QFKD=全峰、FAST=快捷 、POSTB=邮政小包、 GTO=国通、YUNDA=韵达、JD=京东配送、DD=当当宅配、AMAZON=亚马逊物流、 OTHER=其他)
     */
    @ApiModelProperty(value = "物流公司编码")
    @TableField("logistics_code")
    private String logisticsCode;

    @ApiModelProperty(value = "商品种类数量")
    @TableField("goods_sort_quantity")
    private BigDecimal goodsSortQuantity;

    @ApiModelProperty(value = "波次临时标识")
    @TableField("temporary_code")
    private String temporaryCode;

    @ApiModelProperty(value = "是否复核:0不复核，1复核")
    @TableField("is_review")
    private Integer review;

    @ApiModelProperty(value = "订单标识 1-单品单件 2-单品多件 3-多品 4-爆品 5-按单")
    @TableField("order_tag")
    private String orderTag;

    @ApiModelProperty(value = "订单总数")
    @TableField("delivery_count")
    private Integer deliveryCount;

    @ApiModelProperty(value = "已复核订单数")
    @TableField("recheck_delivery_count")
    private Integer recheckDeliveryCount;

    @ApiModelProperty(value = "发货单（订单）计划总数量")
    @TableField("delivery_plan_quantity")
    private BigDecimal deliveryPlanQuantity;

    //与上面的字段return_quantity字段重复
    @ApiModelProperty(value = "复核缺货数量")
    @TableField("recheck_refund_quantity")
    private BigDecimal recheckRefundQuantity;

    /**
     * 承运商编码
     */
    @ApiModelProperty(value = "承运商编码")
    @TableField("carrier_code")
    private String carrierCode;

    /**
     * 承运商名称
     */
    @ApiModelProperty(value = "承运商名称")
    @TableField("carrier_name")
    private String carrierName;


    @ApiModelProperty(value = "出库明细的计划数量")
    @TableField(exist = false)
    private BigDecimal itemPlanQuantity;

    /**
     * 是否预打包拣货单:0否1是
     */
    @ApiModelProperty(value = "是否预打包拣货单:0否1是")
    @TableField("is_prepackaged")
    private Integer prepackaged;

    @ApiModelProperty(value = "预打包单号")
    @TableField("prepackaged_code")
    private String prepackagedCode;

    @ApiModelProperty(value = "取消订单提示语")
    @TableField(exist = false)
    private String cancelOrderPrompt;

    @ApiModelProperty(value = "任务状态，1-未执行，2-执行中，3-执行完成")
    @TableField("task_status")
    private String taskStatus;

    @ApiModelProperty(value = "复核任务状态，1-未执行，2-执行中，3-执行完成")
    @TableField("recheck_task_status")
    private String recheckTaskStatus;

    public interface Save{}

}
